/**
 * {作业名称}
 *
 * 输入参数:
 *
 * 输出参数:
 *
 */
(() => {
  // 私有区域

  return function ({ UID, ...args }) {
    // 验证输入参数
    if (!UID) throw Error("无效会话");

    switch (args.action) {
      case 'get': {
        const { Filter, Order, PageSize, PageNo } = args;
        return A.job.CardR({
          UID,
          Card: "部署授权",
          Model: ["名称", "有效期", "创建时间", "备注", "令牌"],
          Filter, Order, PageSize, PageNo,
        });
      }
      case 'set': {
        const { Record } = args;
        return A.job.CardW({
          UID,
          Card: "部署授权",
          Model: ["名称", "有效期", "令牌", "备注"],
          Record,
        });
      }
      case 'del': {
        const { Records, Safe } = args;
        return A.job.CardD({
          UID,
          Card: "部署授权",
          Records, Safe,
        });
      }
    }
  };
})()